package com.xdf.imoocdatav.controller;

import com.xdf.imoocdatav.service.DatavOrderuserService;
import com.xdf.imoocdatav.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/datavOrderuser")
public class DatavOrderuserController {

    @Autowired
    private DatavOrderuserService service;

    @GetMapping("/selectAll")
    public JsonResult selectAll(){
        return JsonResult.ok(service.selectAll());// 前端拿到的 data 是个数组
    }
}
